/*
 * Singularity Engine
 * Copyright (C) 2010 Vyacheslav Vorobyov, All rights reserved.
 * See LICENSE for full license information.
 */

/**
 * 
 */
package org.singularity.io;

/**
 * 
 * This interface specifies a concept of Data Modification Event (i.e. DME). 
 * Actually it is a wrapper for value(fact) that have been added to or deleted 
 * from Working Memory of a production system.
 * 
 * @author vjache
 *
 * @param <T> - a type of a value (fact).
 */
public interface DME<T> {
	/**
	 * An operation code.
	 * @author vjache
	 *
	 */
	public static enum Code 
	{
		/**
		 * Fact have been added.
		 */
		Add,
		/**
		 * Fact have been removed.
		 */
		Remove
	}

	/**
	 * Returns a code of operation done.
	 * @return
	 */
	Code getCode();
	/**
	 * Returns a value (fact) wrapped by this event.
	 * @return
	 */
	T getValue();
}
